package dice.sinanya.entity;

import java.util.Objects;

public class EntityReply {
    String value;
    int weight;
    boolean publicMode = false;

    public EntityReply() {
    }

    public EntityReply(String value, int weight, boolean publicMode) {
        this.value = value;
        this.weight = weight;
        this.publicMode = publicMode;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public int getWeight() {
        return weight;
    }

    public void setWeight(int weight) {
        this.weight = weight;
    }

    public boolean isPublicMode() {
        return publicMode;
    }

    public void setPublicMode(boolean publicMode) {
        this.publicMode = publicMode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof EntityReply)) return false;
        EntityReply that = (EntityReply) o;
        return getWeight() == that.getWeight() &&
                isPublicMode() == that.isPublicMode() &&
                Objects.equals(getValue(), that.getValue());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getValue(), getWeight(), isPublicMode());
    }


}
